package enu;

public enum ResultData {
    SUCCESS("200", "成功"),
    FAIL("404", "找不到对应资源页"),
    FAILURL("302", "搜索引擎不会替换原始URL"),
    CODEFAIL("500", "自己编写代码错误");

    private String name;
    private String code;

    ResultData(String code, String name) {
        this.code = code;
        this.name = name;
    }



    public String getName() {
        return name;
    }
    public String getCode() {
        return code;
    }

    public static void main(String[] args) {
        ResultData fail = ResultData.FAIL;
        String name1 = fail.getName();
        System.out.println(name1);
        String code1 = fail.getCode();
        System.out.println(code1);
        // 枚举类不能实例化
//        ResultData ss = ResultData("600","未知错误");



    }
}
